package com.ustcinfo.ishare.kafka.monitor.service.impl;

import com.ustcinfo.ishare.kafka.monitor.bean.KafkaConfigFile;
import com.ustcinfo.ishare.kafka.monitor.dao.IKafkaConfigFileDao;
import com.ustcinfo.ishare.kafka.monitor.service.IKafkaConfigFileService;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Shinelon on 2018/4/17.
 */
@Service("kafkaConfigFileService")
public class KafkaConfigFileServiceImpl implements IKafkaConfigFileService {

    @Autowired
    private IKafkaConfigFileDao kafkaConfigFileDao;

    public void insert(KafkaConfigFile kafkaConfigFile) {
        kafkaConfigFileDao.insert(kafkaConfigFile);
    }

    public void removeAll() {
        kafkaConfigFileDao.removeAll();
    }

    public void removeByName(String name) {
        kafkaConfigFileDao.removeByName(name);
    }

    public void removeById(Integer id) {
        kafkaConfigFileDao.removeById(id);
    }

    public KafkaConfigFile getKafkaConfigFileById(Integer id){
        return kafkaConfigFileDao.getKafkaConfigFileById(id);
    }

    public List<KafkaConfigFile> findKafkaConfigFileByName(String name) {
        return kafkaConfigFileDao.findKafkaConfigFileByName(name);
    }

    public List<KafkaConfigFile> findAllKafkaConfigFile() {
        return kafkaConfigFileDao.findAllKafkaConfigFile();
    }

    public List<KafkaConfigFile> findKafkaConfigFileByPage(int start, int size) {
        return kafkaConfigFileDao.findKafkaConfigFileByPage(start, size);
    }

    public List<KafkaConfigFile> findKafkaConfigFile(String name, Long beginTime, Long endTime) {
        return kafkaConfigFileDao.findKafkaConfigFile(name, beginTime, endTime);
    }
}
